#
# ==AUTHOR
#   Sin Yu <scaner@gmail.com>
#
# ==MODULE
#   Constants
#

DEFAULT_PORT = 50333
DEFAULT_LOG_PORT = 50332
DEFAULT_WAREHOUSE_PORT = 50333
DEFAULT_BASE = '/is/app/o3'

# ====
SVC_SYSTEM = 1
SVC_BASE = 2

SVC_SCHEDULE = 1003
SVC_SCHE = SVC_SCHEDULE
SVC_WORKSPACE = 1004
SVC_WS = SVC_WORKSPACE

SVC_FILESYSTEM = 1005
SVC_FS = SVC_FILESYSTEM
SVC_SPACE = SVC_FILESYSTEM
SVC_LOGGING = 1006
SVC_LOG = SVC_LOGGING

SVC_HUB = 1010
SVC_NAMES = 1011
SVC_AUTOCONFIG = 1012
SVC_WAREHOUSE = 1013

SVC_ECHO = 10011
SVC_TEST = 10012
SVC_TIME = 10013

# ====
RET_ERROR = 0
RET_ERR = 0
RET_OK = 200
RET_CONTINUE = 302

# ====
NAMES_ADD = 1
NAMES_UPDATE = 2
NAMES_DELETE = 3
NAMES_EMPTY = 4
NAMES_DUP = 5


# ====
ENTITY_STATE_INIT = 1
ENTITY_STATE_SHADOWING = 2
ENTITY_STATE_READY = 3
ENTITY_STATE_UNAVAILABLE = 4
ENTITY_STATE_DROPING = 5
ENTITY_STATE_DROPED = 6
ENTITY_STATE_ILL = 7

# ====
SJOB_NEW = 0
SJOB_READY = 300
SJOB_WAIT = 100
SJOB_SUBMIT = 500
SJOB_RUN = 600
SJOB_FINISHED = 2800
SJOB_CANCEL0 = 2700
SJOB_CANCEL1 = 2600

SMISSION_NEW = 0
SMISSION_READY = 200
SMISSION_DOING = 400
SMISSION_DONE = 2800
SMISSION_CANCEL = 2700
SMISSION_EXCEPTION = 2600

# ====
ROOM_STATE_OK = 1
ROOM_STATE_LOCK = 2
ROOM_STATE_DROPING = 3
ROOM_STATE_DROPED = 4
ROOM_STATE_UNAVAILABLE = 5

# ====
NODE_STATE_INIT= 0
NODE_STATE_ONLINE = 1
NODE_STATE_OFFLINE = 2

# ====
SHADOW_STATE_INIT = 1
SHADOW_STATE_MIRROR = 2
SHADOW_STATE_OK = 3
SHADOW_STATE_DROPED = 4
SHADOW_STATE_UNAVAILABLE = 5
SHADOW_STATE_UNUSED = 6
SHADOW_STATE_FAILED = 7

# ====
ERROR_UNKNOWN = 0
ERROR_NO_SERVICE = 1001
ERROR_NO_FUNCTION = 1002

ERROR_NETWORK = 1053
ERROR_NO_SUCH_OBJECT = 1054

ERROR_SPACE_PUT = 2001
ERROR_SPACE_NO_SUCH_SNIP = 2012
ERROR_SPACE_NO_SUCH_ROOM = 2013

ERROR_WAREHOUSE_DUPLICATION_NAME = 3001
ERROR_WAREHOUSE_DUPLICATION_ROOMLABEL = 3002
